package cn.wzy.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.ArrayList;
import java.util.List;

/**
 * (CarType)表实体类
 *
 * @author makejava
 * @since 2023-01-24 10:49:10
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("t_car_car_type")
public class CarType{
    @TableId(type = IdType.AUTO)
    private Long id;
    
    private String name;
    
    private String icon;

    @TableField("`index`")
    private Integer index;
    
    private String description;
    //父类型id
    private Long pid;

//    儿子
    @TableField(exist = false)
    private List<CarType> children = new ArrayList<>();
}

